package com.zyit.service.impl;

import com.zyit.mapper.PatientMapper;
import com.zyit.model.Patient;
import com.zyit.service.PatientService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class PatientServiceImpl implements PatientService {

    @Resource
    private PatientMapper patientMapper;

    @Override
    public int add(Patient patient) {
        return patientMapper.add(patient);
    }

    @Override
    public int del(String id) {
        return patientMapper.del(id);
    }

    @Override
    public int findByIdCard(String idCard) {
        return patientMapper.findByIdCard(idCard);
    }

    @Override
    public int findByIdMedicare(String idMedicare) {
        return patientMapper.findByIdMedicare(idMedicare);
    }

    @Override
    public Patient findByIdCardReturn(String idCard) {
        return patientMapper.findByIdCardReturn(idCard);
    }


}
